package com.manage.platform.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.manage.platform.dto.RoleAllocateMenuDto;
import com.manage.platform.entity.RoleMenuEntity;
import com.manage.platform.vo.MenuPartVo;
import com.manage.platform.vo.MenuTreeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * YWD
 * 2025/9/29
 */
@Mapper
public interface RoleMenuMapper extends BaseMapper<RoleMenuEntity> {

    List<MenuTreeVo> getMenuTreeByRoleId(@Param("roleId") Long roleId);

    Boolean allocateMenu(@Param("dto") RoleAllocateMenuDto dto);

    List<MenuPartVo> getMenuTreeByRoleIdTwo(@Param("roleId") Long roleId);

}
